package com.study.design.model.createPattern.factory.simpleFactory;

import org.junit.Test;

/**
* @Name: Client
* @Description: 简单工厂模式测试类
* @Author: 李超	lc_jack@foxmail.com
* @CreateDate: 2017-2-10 下午3:46:18 
* @Version: V1.0
 */
public class Client {
	
	/**
	* @Name: noFactory
	* @Description: 不使用工厂模式
	* @Author: 李超	lc_jack@foxmail.com
	* @Version: V1.0
	* @CreateDate: 2017-2-10 下午3:45:49
	* @Parameters: 
	* @Return: void
	 */
	@Test
	public void noFactory() {
		Car audi = new Audi() ;
		audi.run() ;
		Car byd = new Byd() ;
		byd.run() ;
	}
	
	/**
	* @Name: simpleFactory01
	* @Description: 使用简单工厂创建汽车实例
	* @Author: 李超	lc_jack@foxmail.com
	* @Version: V1.0
	* @CreateDate: 2017-2-10 下午3:51:16
	* @Parameters: 
	* @Return: void
	 */
	@Test
	public void simpleFactory01() {
		Car audi = CarFactory.createCar("奥迪") ;
		audi.run() ;
		Car byd = CarFactory.createCar("比亚迪") ;
		byd.run() ;
	}
	
	/**
	* @Name: simpleFactory02
	* @Description: 使用简单工厂创建汽车实例
	* @Author: 李超	lc_jack@foxmail.com
	* @Version: V1.0
	* @CreateDate: 2017-2-10 下午3:52:33
	* @Parameters: 
	* @Return: void
	 */
	@Test
	public void simpleFactory02() {
		Car audi = CarFactory.createAudi() ;
		audi.run() ;
		Car byd = CarFactory.createByd() ;
		byd.run() ;
	}
	

}











